package com.wenyl.juc.thread.callback;

/**
 * @author Swimming Dragon
 * @description: TODO
 * @date 2024年11月05日 22:45
 */
public class Client {
    Server server;
    public Client(Server server){this.server = server;}
    public void sendMsg(final String msg){
        System.out.println("客户端发送消息=="+msg);
        //server.getMsg(new MyCallback(),msg);
        new Thread(new Runnable() {
            @Override
            public void run() {
                server.getMsg(new MyCallback(),msg);
            }
        }).start();
        System.out.println("客户端已经发送消息，请稍等");
    }

}
